<?php /* Smarty version 2.6.18, created on 2016-12-30 17:12:24
         compiled from cadre/cadre.list.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.left.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  <!--主要内容开始-->
<div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid"> 
                <div class="box-header with-border">
				<?php $_from = $this->_tpl_vars['appoint_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                    <a href="index.php?a=cadre.list&class_id=<?php echo $this->_tpl_vars['value']['class_id']; ?>
" <?php if ($this->_tpl_vars['value']['class_id'] == $this->_tpl_vars['class_id']): ?> class="btn btn-primary" style="color:#fff;" <?php else: ?> class="btn btn-default"<?php endif; ?>><?php echo $this->_tpl_vars['value']['class_name']; ?>
班干部任命</a>
                <?php endforeach; endif; unset($_from); ?>  
                </div>    
         <div class="box-body">
               <table class="table table-bordered table-striped"  id="mytable">   
                              <thead>
                                  <tr style="background-color:#a273ff;">
                                         <td>学号</td>
                                         <td>姓名</td>
                                         <td>职务</td>
                                         <td width="150">操作</td>
                                  </tr>
                                </thead>
                                <tbody>
                                <?php $_from = $this->_tpl_vars['divide_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                    <tr>
                                        <td><?php echo $this->_tpl_vars['value']['student_no']; ?>
</a></td>
                                        <td><?php echo $this->_tpl_vars['value']['student_name']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['leader_name']; ?>
</td>
                                        <td>
										<a onClick="show('<?php echo $this->_tpl_vars['value']['student_no']; ?>
', '<?php echo $this->_tpl_vars['value']['student_name']; ?>
', '<?php echo $this->_tpl_vars['value']['student_id']; ?>
','<?php echo $this->_tpl_vars['value']['divide_id']; ?>
')" href="" class="btn btn-success btn-xs" data-toggle="modal" data-target="#myModal">班干部任命</a>
                                          
                                        </td>
                                    </tr>   
                                <?php endforeach; endif; unset($_from); ?>  
                            </tbody>
                        </table>                     
                   </div><!--box-body -->
                              </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
</div>
 <!--主要内容结束-->
 <!--弹出框-->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
         <form action="" method="post">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">班干部任命</h4>
              </div>
              <div class="modal-body">
                    学号：<span id = "bbb"></span>  <span style="margin-left:20px;">姓名：</span><span id="ming"></span>
                    <div class="form-group" style="margin-top:16px;">
                        <p>班干部任命</p>
                               <select class="form-control" style="padding:0;" name="leader_id" id="">
                                     <option value="">请选择</option>
								<?php $_from = $this->_tpl_vars['leader_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                      <option value="<?php echo $this->_tpl_vars['value']['leader_id']; ?>
"<?php if ($this->_tpl_vars['value']['leader_id'] == $this->_tpl_vars['leader_id']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['value']['leader_name']; ?>
</option>
                                <?php endforeach; endif; unset($_from); ?>
                                </select>
                    </div>
              </div>
              <div class="modal-footer center-block">
			    <input type="hidden" name="divide_id" value="" id="ddd">
			    <input type="hidden" name="student_id" value="" id="ccc">
                <button type="submit" class="btn btn-primary">确 定</button>
              </div>
          </form>
    </div>
  </div>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script>

function show(a, b, c, d){
	
	$("#bbb").html(a);
	$("#ming").html(b);
	$("#ccc").val(c);
	$("#ddd").val(d);

	
	}

</script>